<template>
  <div class="row">
    <div class="col-sm-6">
      <label for="inputPassword" class="col-sm-2 col-form-label"
        >试题类型</label
      >
    </div>
    <div class="col-sm-6">
      {{ questionType.qtname }}
    </div>
    <el-button type="primary" @click="edit" style="margin-left: 550px"
      >编辑</el-button
    >
    <el-button @click="goBack">返回</el-button>
  </div>
</template>

<script>
export default {
  name: "QuestionTypeView",
  data() {
    return {
      questionType: {},
    };
  },
  props: {
    id: {
      required: true,
    },
  },
  mounted() {
    this.$parent.questionTypeTitle = "试题类型查看";
    this.getQuestionType();
  },
  methods: {
    getQuestionType() {
      this.axiosJSON.get("/questionType/getOne?id=" + this.id).then((result) => {
        this.questionType = result.data.data;
      });
    },
    goBack() {
      this.$router.push("/questiontype/list");
    },
    edit() {
      this.$router.push("/questiontype/modify/" + this.id);
    },
  },
};
</script>

<style>
</style>